<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>添加客户信息</title>
		<link rel="stylesheet" type="text/css" href="../../css/tc/tc.css" />
		<style type="text/css">
			body{
				overflow-y: hidden;
			}
		</style>
	</head>
	<body>
		<!--弹框-->
		<div class="cd-popup">
			<div class="cd-popup-container">
				<p></p>
				<div class="cd-buttons">
					<form class="form">
						<div class="bd1">
							<div><span>客户名称：</span><br><input type="text" name="c_name" id="c_name" placeholder="姓名" /></div>
							<div><span>客户性别：</span><br>
								<select id="c_sex" name="c_sex" class="from">
									<option value=""><span style="color: #C9C9C9; ">客户性别</span></option>
									<option value="girl">女</option>
									<option value="boy">男</option>
								</select></div>
							<div><span>客户手机：</span><br><input type="text" name="c_tel" id="c_tel" placeholder="号码" /></div>
							<div><span>客户邮箱：</span><br><input type="text" name="c_email" id="c_email" placeholder="邮箱" /></div>
							<div class="layui-input-inline"><span>下次联系时间：</span><br> <input type="text" class="layui-input" name="next_time" id="next_time"
																							placeholder="yyyy-MM-dd"></div>
							<div><span>客户地址：</span><br>
								<input type="text" class="layui-input" name="c_address" id="c_address"
									   placeholder="详细地址">
							</div>
						</div>
						<div class="bd2">
							<div><span>客户来源：</span><br>
								<select id="c_from" name="c_from" class="from">
									<option value=""><span style="color: #C9C9C9;">客户来源</span></option>
									<option value="邮件营销">邮件营销</option>
									<option value="广告">广告</option>
									<option value="直接访问">直接访问</option>
									<option value="搜索引擎">搜索引擎</option>
								</select></div>
							<div><span>客户行业：</span><br><input type="text" name="c_industry" id="c_industry" placeholder="行业" /></div>
							<div><span>客户负责人：</span><br><input type="text" name="c_principal" id="c_principal" placeholder="负责人" /></div>
							<div><span>成交状态：</span><br>
								<select id="c_status" name="c_status" class="from">
									<option value=""><span style="color: #C9C9C9;">成交状态</span></option>
									<option value="已成交">已成交</option>
									<option value="未成交">未成交</option>
								</select></div>
							<div class="layui-input-inline"><span>客户级别：</span><br>
								<select id="c_level" name="c_level" class="from">
									<option value=""><span style="color: #C9C9C9;">客户级别</span></option>
									<option value="重点客户">重点客户</option>
									<option value="普通客户">普通客户</option>
									<option value="潜在顾客">潜在顾客</option>
								</select>
							</div>
						</div>
						<input type="submit" value="提交" class="submit" />
					</form>
				</div>

			</div>
		</div>
		<script src="../../js/jquery3.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			layui.use('laydate',function() {
				var laydate = layui.laydate;
				//常规用法
				laydate.render({
					elem: '#next_time'
				});

			})
			$(function () {
				$(".form").submit(function(){
					$.ajaxSettings.async=false;
					$.post("/customer/addCustomer",$(this).serialize(),function(data){
						if (data=="success"){
							window.parent.location.reload();
							var index=parent.layer.getFrameIndex(window.name);
							parent.layer.close(index);
						}
					})
				})
			})
		</script>

	</body>
</html>
